Is Prime def is_prime(n): for i in range(2, int(n ** .5 + 1)): if n % i == 0: return False return True Python Snippet Dec 10 2018